package com.shuw.com.beingfortextproject.utils;

import rx.subjects.PublishSubject;
import rx.subjects.SerializedSubject;

/**
 * Created by ${cs} on 2018/4/27.
 */

public class RxBus  {

	public  static RxBus getDefault(){
		return RxBusInstance.rxBus;
	}


	// 内部类
	private static class RxBusInstance{
		private static final RxBus rxBus = new RxBus();
	}

	//
	public final rx.subjects.Subject bus;

	private RxBus (){
		bus = new SerializedSubject<>(PublishSubject.create());
	}
}
